﻿using AutoMail.Models;
using Quartz;

namespace AutoMail.QuartzJobs.Interfaces
{
    public interface IJobsManager
    {
        Task<Dictionary<IJobDetail, IReadOnlyCollection<ITrigger>>> CurrentStaffsMailJobs();
        Task<IReadOnlyCollection<IJobExecutionContext>> GetCurrentExecutingJobs(IScheduler scheduler);
        Task<IReadOnlyCollection<JobKey>> GetAllScheduledJobs(IScheduler scheduler);
        Task ScheduleNewOrModifyJobs(IScheduler scheduler, List<EmailJob> emailJobs);
        Task UpdateAllJobs(IScheduler scheduler);
        void RefreshMailSendConfig();
        Task DeleteJobsOfOneStaff(IScheduler scheduler, EmailJob emailJob);
    }
}
